package com.wuchao.spring.aoppromax;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Service;

/**
 * @Author wuchao66
 * @Date 2023/9/25 15:23
 * @PackageName:com.wuchao.spring.aoppromax
 * @ClassName: TheAspect
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
@Aspect//告诉电脑我是切面
@Service//这个要写，因为要给系统吊
public class TheAspect {

//    @Before(value = "execution( * com.wuchao.spring.aoppromax.PointCut.*(..))")
//    public void before(){
//        System.out.println("前置增强167");
//    }
    @Before(value = "pointcut1()")
    public void before(){
        System.out.println("前置增强167");
    }
    @Pointcut(value = "execution( * com.wuchao.spring.aoppromax.PointCut.*(..))")
    public void pointcut1(){
    }
    @AfterReturning(value = "pointcut1()")
    public void afterReturning(){
        System.out.println("后置增强");
    }
//    @Around()
//    @After()
//    @AfterThrowing
//    public  void showww(){
//
//    }
//    @AfterReturning(value = "execution( * com.wuchao.spring.aoppromax.PointCut.*(..))")
//    public void afterReturning(){
//        System.out.println("后置增强");
//    }
}
